#ifndef CSCNENT_H_
#define CSCNENT_H_

#include "../util.h"

class CScnEnt
{
public:
    u32 srefidx;            //index into a solid, like doors
    u32 n_fields;

    struct field
    {
        char key[128];
        char value[128];
    };

    field * fields;

    const char * getField(const char * key)
    {
        for (field * fi = fields; fi!=&fields[n_fields]; fi++)
            if (str_equiv(fi->key,key))
                return fi->value;

        return NULL;
    }

    CScnEnt() : srefidx(0), n_fields(0)
    {}

   ~CScnEnt()
    {
        if (fields)
            delete [] fields;
    }
};

#endif
